package it.polimi.traveldream.web.beans;

import it.polimi.traveldream.ejb.acquistomanagement.AcquistoMgr;

import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean (name="carrelloBean")
@SessionScoped
public class CarrelloBean {

	@EJB
	private AcquistoMgr acquistoMgr;

	private List<?> result;
	
	public String findByUser(){
		result = acquistoMgr.findByUser();
		return "carrello?faces-redirect=true";
	}

	public AcquistoMgr getAcquistoMgr() {
		return acquistoMgr;
	}

	public void setAcquistoMgr(AcquistoMgr acquistoMgr) {
		this.acquistoMgr = acquistoMgr;
	}

	public List<?> getResult() {
		return result;
	}

	public void setResult(List<?> result) {
		this.result = result;
	}
	
}
